Skip to content

Conversation

@benlangmuir
Copy link
Contributor

@benlangmuir benlangmuir commented Jan 24, 2020

When doing header interface generation, we interpret clang command-line
arguments in initInvocationByClangArguments and attempt to setup a
matching Swift compiler invocation. One important argument is the module
cache, but clang will only interpret -fmodules-cache-path if modules
are enabled (typically with -fmodules). While the header itself might
not need modules, Swift will import its own shims module and during
testing this needs to honour lit's provided cache. So we add -fmodules
in sourcekitd-test anytime we add -fmodules-cache-path.

rdar://58836540

When doing header interface generation, we interpret clang command-line
arguments in `initInvocationByClangArguments` and attempt to setup a
matching Swift compiler invocation. One important argument is the module
cache, but clang will only interpret `-fmodules-cache-path` if modules
are enabled (typically with `-fmodules`). While the header itself might
not need modules, Swift will import its own shims module and during
testing this needs to honour lit's provided cache. So we add -fmodules
in sourcekitd-test anytime we add -fmodules-cache-path.

rdar://58836540
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

This is a follow-on to #29357 to make the -fmodules-cache-path part actually work.

@benlangmuir benlangmuir requested a review from nathawes January 24, 2020 19:49
@benlangmuir benlangmuir merged commit 78d7243 into swiftlang:master Jan 24, 2020
@benlangmuir benlangmuir deleted the modules-woes branch January 24, 2020 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants